<link rel="stylesheet" type="text/css" href="{$_W['siteroot']}app/themes/vcard03/static/css/marketingking_footer_chat.css">
<script type="text/javascript" src="{$_W['siteroot']}app/themes/vcard03/static/js/swipe.js"></script>
<link rel="stylesheet" type="text/css" href="{$_W['siteroot']}app/themes/vcard03/static/css/marketingking_shared_footer_index.css">
<style type="text/css">
    img { border: 0;max-width: 100%; }
    ul.information2 {
        height:auto;
    }
    ul.information2 li {
        height:auto;
    }
    ul.information2 li p {
        height:auto;
    }
    ul li p {
        word-wrap: break-word;
        white-space:pre-wrap;
    }
    div.weichat {
        height:auto;
    }
    span.jiant {
        top:auto;
        margin-top:-15px;
    }
</style>
{php $multi = pdo_fetch("SELECT * FROM ".tablename('site_multi')." WHERE id=:id AND uniacid=:uniacid", array(':id' => $multiid, ':uniacid' => $_W['uniacid'])); $multi['site_info'] = @iunserializer($multi['site_info']); }
<div class="weichatBox">
    {data func="site_navs" section="1" item="nav"}
    <div class="weichat">
        <a href="javascript:void(0);" class="wcloseBtn">
            <img src="{$_W['siteroot']}app/themes/vcard03/static/images/v_img47.png">
        </a>
        <div class="people2">
            <p>
                <span>
                    <img src="{php echo !empty($multi['site_info']['thumb']) ? $multi['site_info']['thumb'] : $_W['account']['avatar'];}" alt="头像">
                </span>
            </p>
            <div>
                <span>{if !empty($nav[name])}{$nav[name]}{else}姓名{/if}</span>
                <p>{if !empty($nav[description])}{$nav[description]}{else}中国 微名片{/if}</p>
            </div>
        </div>

        <p class="information2">
            联系电话：<a style="color:#000000;" href="{if !empty($nav[url])}{$nav[url]}{else}tel:13688889999{/if}">{php echo next(explode('tel:',$nav['url']))}</a>
        </p>

        <p class="wtxt2">长按图片识别二维码</p>
            <span class="jiant">
                <img src="{$_W['siteroot']}app/themes/vcard03/static/images/v_img116.png"></span>
        <div class="erweima">
            {php $noicon = './themes/vcard03/static/images/nowxqrcode.jpg'}
            <img src="{php echo !empty($nav[icon]) ? $_W[attachurl].$nav[icon] : $noicon;}" alt="微信二维码">
        </div>
        <p class="wtxt">点击“<strong>关注</strong>”，就可以随时随地的咨询</p>
    </div>
    {/data}
</div>
<div class="fleft">
    <a class="chat" href="javascript:void(0);">
        <p>
            <span>
                {php $site_thumb = !empty($multi['site_info']['thumb']) ? $multi['site_info']['thumb'] : "app/themes/vcard03/static/images/nouser.jpg"}
                <img src="{$site_thumb}" alt="头像">
            </span>
        </p>
        <span style="font-size: 14px;">
            {if !empty($_W['styles']['vname'])}{$_W['styles']['vname']}{else}姓名{/if}
        </span>
    </a>
</div>
<!---个人微信二维码-->
<script type="text/javascript">
    $(function () {
        $(".chat").click(function () {
			if($(".weichat").get(0)) $(".weichatBox").show();
        });
        $(".wcloseBtn").click(function () {
            $(".weichatBox").hide();
        });
        $(".nav-group-item a").each(function(index,dom){
            var dh=dom.href;
            if(dh.indexOf('unsafe:sms:')==0){
                dom.href=dh.substring(7);
            }
        });
    })
</script>
<style type="text/css">
    .nav-menu-app{padding-left:20%;box-shadow: 0 -3px 5px rgba(0,0,0,.8);}
</style>
{data func="site_quickmenu"}{/data}
		<script>require(['bootstrap']);</script>
	</div>
	<style>
		h5{color:#555;}
	</style>
<?php
	$_share['title'] = !empty($_share['title']) ? $_share['title'] : $_W['account']['name'];
	$_share['imgUrl'] = !empty($_share['imgUrl']) ? $_share['imgUrl'] : '';
	if(isset($_share['content'])){
		$_share['desc'] = $_share['content'];
		unset($_share['content']);
	}
	$_share['desc'] = !empty($_share['desc']) ? $_share['desc'] : '';
	$_share['desc'] = preg_replace('/\s/i', '', str_replace('	', '', cutstr(str_replace('&nbsp;', '', ihtmlspecialchars(strip_tags($_share['desc']))), 60)));
	if(empty($_share['link'])) {
		$_share['link'] = '';
		$query_string = $_SERVER['QUERY_STRING'];
		if(!empty($query_string)) {
			parse_str($query_string, $query_arr);
			$query_arr['u'] = $_W['member']['uid'];
			$query_string = http_build_query($query_arr);
			$_share['link'] = $_W['siteroot'].'app/index.php?'. $query_string;
		}
	}
?>
	<script type="text/javascript">
	
	wx.config(jssdkconfig);
	
	var $_share = {php echo json_encode($_share);};
	
	if(typeof sharedata == 'undefined'){
		sharedata = $_share;
	} else {
		sharedata['title'] = sharedata['title'] || $_share['title'];
		sharedata['desc'] = sharedata['desc'] || $_share['desc'];
		sharedata['link'] = sharedata['link'] || $_share['link'];
		sharedata['imgUrl'] = sharedata['imgUrl'] || $_share['imgUrl'];
	}

	function tomedia(src) {
		if(typeof src != 'string')
			return '';
		if(src.indexOf('http://') == 0 || src.indexOf('https://') == 0) {
			return src;
		} else if(src.indexOf('../addons') == 0 || src.indexOf('../attachment') == 0) {
			src=src.substr(3);
			return window.sysinfo.siteroot + src;
		} else if(src.indexOf('./resource') == 0) {
			src=src.substr(2);
			return window.sysinfo.siteroot + 'app/' + src;
		} else if(src.indexOf('images/') == 0) {
			return window.sysinfo.attachurl+ src;
		}
	}
	
	if(sharedata.imgUrl == ''){
		var _share_img = $('body img:eq(0)').attr("src");
		if(_share_img == ""){
			sharedata['imgUrl'] = window.sysinfo.attachurl + 'images/global/wechat_share.png';
		} else {
			sharedata['imgUrl'] = tomedia(_share_img);
		}
	}
	
	if(sharedata.desc == ''){
		var _share_content = _removeHTMLTag($('body').html());
		if(typeof _share_content == 'string'){
			sharedata.desc = _share_content.replace($_share['title'], '')
		}
	}
	
	wx.ready(function () {
		wx.onMenuShareAppMessage(sharedata);
		wx.onMenuShareTimeline(sharedata);
		wx.onMenuShareQQ(sharedata);
		wx.onMenuShareWeibo(sharedata);
	});
	{if $controller == 'site' && $action == 'site'}
		$('#category_show').click(function(){
			$('.head .order').toggleClass('hide');
			return false;
		});
		//文章点击和分享加积分
		{if !empty($_GPC['u'])}
			var url = "{php echo url('site/site/handsel/', array('id' => $detail['id'], 'action' => 'click', 'u' => $_GPC['u']), true);}";
			$.post(url, function(dat){});
		{/if}
		sharedata.success = function(){
			var url = "{php echo url('site/site/handsel/', array('id' => $detail['id'], 'action' => 'share'));}";
			$.post(url, function(dat){});
		}
	{/if}
	$(function(){
		if($('.js-quickmenu')!=null && $('.js-quickmenu')!=''){
			var h = $('.js-quickmenu').height()+'px';
			$('body').css("padding-bottom",h);
		}else{
			$('body').css("padding-bottom", "0");
		}
	});

	{if defined('IN_MODULE')}
	$.getJSON("{url 'utility/checkupgrade/module' array('m' => IN_MODULE)}", function(result) {
		if (result.message.errno == -10) {
			$('body').prepend('<div id="upgrade-tips-module" class="upgrade-tips text-center"><a class="label label-danger" href="http://wpa.b.qq.com/cgi/wpa.php?ln=1&key=XzkzODAwMzEzOV8xNzEwOTZfNDAwMDgyODUwMl8yXw" target="_blank">' + result.message.message + '</a></div>');
			if ($('#upgrade-tips').size()) {
				$('#upgrade-tips-module').css('top', '25px');
			}
		}
	});
	{/if}
	</script>
</body>
</html>
